package huawei_nowcoder;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @order  15
 * @decription 求int正整形在内存中存储时1的个数
 */
public class OneNumber {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();

        List<Integer> list=new ArrayList<>();
        while (n>1){
            list.add(n%2);
            n/=2;
        }
        list.add(n);

        int count=0;
        for (Integer i: list
        ) {
            if (i==1)
                count++;
        }

        System.out.println(count);
    }
}
